let aaa: string = '我是一个好学生';

const bbb: string = '一个好学生';

let ccc: number = 666;

aaa = ccc + "";

let a: boolean = true;

let list1: number[] = [1, 2, 3];

let list3: string[] = ['dasda', 'sadasd', 'asda'];

let list2: Array<number> = [1, 2, 3];

let t: [number, string];

let b: undefined = undefined;

let c: null = null;

let d: void = undefined;

declare function create(o: object | null): void;

create({ prop: 0 });
create(null);

t = [10, 'dasd'];

const oo: object = {
	s: 'adasda',
	f: 123,
	v: 'asda',
	sss: [1, 2, 3]
};

function add(x: number, y: number): number {
	return x + y;
}

add(11, 2);

function joint(x: string, y?: string, z?: string): string{
	return x + y;
}
joint('1');
joint('1', '2');

function bbbbb(x: string, ...rest_name: string[]): string{
	return x + rest_name.join("");
}
bbbbb("zzxc", "asda", "sdasd");


function buildName(firstName: string, lastName = "Smith") {
    return firstName + " " + lastName;
}
buildName("aaaa", '123');

function ababab(a: string | number) {
	return a;
}
ababab('aaa');
ababab(111);


function addd(a: number | string, b: number | string) {
	if (typeof a === 'number' && typeof (b) === 'number') {
		return a + b;
	}
	return a.toString() + b.toString();
}



























